// http://extjs.com/forum/showthread.php?t=13109
Ext.form.Action.DWRSubmit = function(form, options) {
    Ext.form.Action.Submit.superclass.constructor.call(this, form, options);
}

Ext.extend(Ext.form.Action.DWRSubmit, Ext.form.Action, {
    type : 'DWRSubmit',

    run : function(){
        var o = this.options;
        var paramJson = {};// whatever

//      Must use createDelegate to give the callback the required scope
//      until http://getahead.org/bugs/browse/DWR-116 is fixed...
        o.dwrMethod(paramJson, this.processResponse.createDelegate(this));
    },

//  Process the DWR return value
    processResponse: function(response){
//     blah...
        if (typeof options.callback == "function") {
            options.callback(response);
        }
    }
});

Ext.form.Action.ACTION_TYPES.DWRSubmit= Ext.form.Action.DWRSubmit;

/* Then it's just

Code:

    myForm.doAction("DWRSubmit", {
        dwrMethod: myDWRComponent.processStuff,
        callback: someFunction
    });

Where the second parameter allows you to specify the options parameter which is passed into
the constructor when the form creates the requested Action instance to call run() on..
*/